version: '3.0'

services:
  geoserver:
    image: ogccite/geoserver:wfs11
    depends_on:
      - postgres
    build:
      args:
        GEOSERVER_DATA_DIR_SRC: "./wfs11/citewfs-1.1"

  teamengine:
    volumes:
      - ./wfs11/wfs-1.1.0.xml:/home/teamengine/te_base/forms/wfs-1.1.0.xml
    command: /run-test.sh wfs11

  postgres:
    image: ogccite/postgres:wfs11
    build:
      context: .
      dockerfile: ./postgres/Dockerfile
    ports:
      - 5432
    env_file:
      - ./.env
      - ./postgres/postgres.env
    volumes:
    - pg_data:${PGDATA:-/var/lib/postgresql/data}:rw
    - ./wfs11/01-init-user.sh:/docker-entrypoint-initdb.d/01-init-user.sh
    - ./wfs11/02-init-db.sql.gz:/docker-entrypoint-initdb.d/02-init-db.sql.gz
    - ./wfs11/postgresql.conf:/etc/postgresql/postgresql.conf

volumes:
  pg_data:
